<template>
  <el-upload
    ref="upload"
    v-model:file-list="fileList"
    class="upload-demo"
    :on-preview="handlePreview"
    :on-remove="handleRemove"
    :before-upload="beforeUpload"
    :on-change="handleChange"
    :on-exceed="handleExceed"
    :auto-upload="false"
    :limit="1"
  >
    <el-button type="primary">上传</el-button>
    <template #tip>
      <div class="el-upload__tip text-red">大小不超过10M</div>
    </template>
  </el-upload>
</template>
<script setup>
import { ref } from "vue";
import { ElMessage, ElMessageBox, genFileId } from "element-plus";
</script>
